-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customization and extension of lockfile metadata headers #106
Conversation
This would almost certainly have to be an opt-in not an opt-out feature |
@mariusvniekerk, easy enough if I set the default to "previous". Any other feedback? |
We might want to explicitly version the metadata header version (with no version being the simple legacy form). That leaves an extension point for the future open. |
I implemented your suggestions. I realize now that I may have misinterpreted your suggestion for versioning metadata... Do you mean like there would be a flag What sort of versioning would make sense? I'm thinking semver major-only so that we'd only increment when there's a breaking change. The new behavior of my two respective commits: conda-lock -f environment.yml
# Generated by conda-lock.
# platform: win-64
# input_hash: f15a045753a401da73dd7c1693fd031e0ad41c0b4c9ca8545c0a8ab56c21d16c
@EXPLICIT
conda-lock -f environment.yml --metadata=all
# ---
# conda-lock-metadata:
# about: This lockfile was generated by conda-lock to ensure reproducibility.
# command: conda-lock -f environment.yml --metadata=all
# command_with_path: /root/conda/envs/conda-lock/bin/conda-lock -f environment.yml --metadata=all
# comment: null
# conda_lock_version: 0.11.3.dev0+gf2ba8d4.d20210904
# created_by: root
# input_hash: f15a045753a401da73dd7c1693fd031e0ad41c0b4c9ca8545c0a8ab56c21d16c
# metadata_version: 1
# platform: win-64
# timestamp: 2021-09-08 20:12:23+02:00
# ...
@EXPLICIT |
Yeah that looks good to me as an output. Maybe not emit the null portions for the metadata, by default. There are some parts of conda-lock that do parse out fields like the input hash and I suspect those tests may be need some updating |
By my logic, I think Regarding the hash filtering in the tests, the output should now be identical unless I made a mistake. Unfortunately I won't have any time until next week to work on this. |
@maresb maybe you're interested in chiminig in here: mamba-org/mamba#1209 |
@maresb Now that the new lock stuff is mostly live, this can probably be resurrected if you still want it |
Cool, thanks! Unfortunately it will be a while before I can get to this. |
This is stale. |
Here is an explanation of this PR through examples, showing only the resulting headers.
I have not yet written any tests or updated the README. Do these features look good?